﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HelpCentral.Data.Model
{
    internal sealed class ContextContainer
    {
        protected static HelpCentralModelContainer _context = null;
        private static object _lock = new object();

        public static HelpCentralModelContainer Instance
        {
            get
            {
                return GetContext();
            }
        }

        private static HelpCentralModelContainer GetContext()
        {
            lock(_lock) 
            {
                if (_context == null)
                {
                    _context = new HelpCentralModelContainer();
                }
            }

            return _context;
        }
    }
}
